package com.amazon.inapp.purchasing;

public final class PurchaseResponse
{
  private static final String TO_STRING_FORMAT = "(%s, requestId: \"%s\", purchaseRequestStatus: \"%s\", userId: \"%s\", receipt: %s)";
  private final PurchaseRequestStatus _purchaseRequestStatus;
  private final Receipt _receipt;
  private final String _requestId;
  private final String _userId;

  PurchaseResponse(String paramString1, String paramString2, Receipt paramReceipt, PurchaseRequestStatus paramPurchaseRequestStatus)
  {
    Validator.validateNotNull(paramString1, "requestId");
    Validator.validateNotNull(paramPurchaseRequestStatus, "purchaseRequestStatus");
    if (paramPurchaseRequestStatus == PurchaseRequestStatus.SUCCESSFUL)
    {
      Validator.validateNotNull(paramReceipt, "receipt");
      Validator.validateNotNull(paramString2, "userId");
    }
    this._requestId = paramString1;
    this._userId = paramString2;
    this._receipt = paramReceipt;
    this._purchaseRequestStatus = paramPurchaseRequestStatus;
  }

  public PurchaseRequestStatus getPurchaseRequestStatus()
  {
    return this._purchaseRequestStatus;
  }

  public Receipt getReceipt()
  {
    return this._receipt;
  }

  public String getRequestId()
  {
    return this._requestId;
  }

  public String getUserId()
  {
    return this._userId;
  }

  public String toString()
  {
    Object[] arrayOfObject = new Object[5];
    arrayOfObject[0] = super.toString();
    arrayOfObject[1] = this._requestId;
    arrayOfObject[2] = this._purchaseRequestStatus;
    arrayOfObject[3] = this._userId;
    arrayOfObject[4] = this._receipt;
    return String.format("(%s, requestId: \"%s\", purchaseRequestStatus: \"%s\", userId: \"%s\", receipt: %s)", arrayOfObject);
  }

  public static enum PurchaseRequestStatus
  {
    static
    {
      FAILED = new PurchaseRequestStatus("FAILED", 1);
      INVALID_SKU = new PurchaseRequestStatus("INVALID_SKU", 2);
      ALREADY_ENTITLED = new PurchaseRequestStatus("ALREADY_ENTITLED", 3);
      PurchaseRequestStatus[] arrayOfPurchaseRequestStatus = new PurchaseRequestStatus[4];
      arrayOfPurchaseRequestStatus[0] = SUCCESSFUL;
      arrayOfPurchaseRequestStatus[1] = FAILED;
      arrayOfPurchaseRequestStatus[2] = INVALID_SKU;
      arrayOfPurchaseRequestStatus[3] = ALREADY_ENTITLED;
    }
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.amazon.inapp.purchasing.PurchaseResponse
 * JD-Core Version:    0.6.2
 */